﻿using System;

namespace Tools.Utilities
{
    public static class DateFormats
    {
        public const string MonthDayYearFormat = "MM/dd/yyyy";

        public const string FullMonthDayYearFormat = "MMMM dd, yyyy";

        public const string HourFormat = "hh";

        public const string MinuteFormat = "mm";

        public const string PeriodFormat = "tt";

        public const string FullDateTimeFormat = "MM/dd/yyyy hh:mm tt";

        public const string MonthYearFormat = "MMMM, yyyy";

        public const string MonthDayFormat = "MMMM dd";

        public const string ScheduleFormat = "dddd, MMMM dd, yyy";

        public const string PublishDateFormat = "dddd, MMM d, yyyy";

        public static string ToScheduleString(this DateTime date)
        {
            return date.Date != DateTime.Today ? date.ToString(ScheduleFormat) : "Today";
        }

        public static string ToMonthYearFormat(this DateTime date)
        {
            return date.ToString(MonthYearFormat);
        }

        public static string ToMonthDayYearFormat(this DateTime date)
        {
            return date.ToString(MonthDayYearFormat);
        }

        public static string ToFullMonthDayYearFormat(this DateTime date)
        {
            return date.ToString(FullMonthDayYearFormat);
        }
    }
}
